package com.shiguiwu.springmybatis.spring.scheduled;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;

/**
 * @description: 定时任务，简单版
 * @author: stone
 * @date: Created by 2021/6/11 19:02
 * @version: 1.0.0
 * @pakeage: com.shiguiwu.springmybatis.spring.scheduled
 */
@ComponentScan
@EnableScheduling
@EnableAsync
public class ScheduledTests {

    public static void main(String[] args) throws InterruptedException {
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(ScheduledTests.class);
        while (true) {
            Thread.sleep(2000);

            System.out.println( Thread.currentThread().getName()+ "====================");
        }
    }
}
